Optimal. Leaf size=57 \[ -\frac{c (A+i B)}{a f (-\tan (e+f x)+i)}+\frac{B c \log (\cos (e+f x))}{a f}-\frac{i B c x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.090516, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.051, Rules used = {3588, 43} \[ -\frac{c (A+i B)}{a f (-\tan (e+f x)+i)}+\frac{B c \log (\cos (e+f x))}{a f}-\frac{i B c x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 43
Rubi steps
\begin{align*} \int \frac{(A+B \tan (e+f x)) (c-i c \tan (e+f x))}{a+i a \tan (e+f x)} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{A+B x}{(a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (\frac{-A-i B}{a^2 (-i+x)^2}-\frac{B}{a^2 (-i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{i B c x}{a}+\frac{B c \log (\cos (e+f x))}{a f}-\frac{(A+i B) c}{a f (i-\tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 1.39471, size = 124, normalized size = 2.18 \[ \frac{c \cos (e+f x) (A+B \tan (e+f x)) \left (\tan (e+f x) \left (-i A+B \log \left (\cos ^2(e+f x)\right )+B\right )+A-2 i B \tan ^{-1}(\tan (f x)) (\tan (e+f x)-i)-i B \log \left (\cos ^2(e+f x)\right )+i B\right )}{2 a f (\tan (e+f x)-i) (A \cos (e+f x)+B \sin (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 64, normalized size = 1.1 \begin{align*}{\frac{iBc}{af \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{Ac}{af \left ( \tan \left ( fx+e \right ) -i \right ) }}-{\frac{Bc\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{af}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.72784, size = 186, normalized size = 3.26 \begin{align*} \frac{{\left (-4 i \, B c f x e^{\left (2 i \, f x + 2 i \, e\right )} + 2 \, B c e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) +{\left (i \, A - B\right )} c\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.4868, size = 114, normalized size = 2. \begin{align*} - \frac{2 i B c x}{a} + \frac{B c \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} + \begin{cases} \frac{\left (i A c - B c\right ) e^{- 2 i e} e^{- 2 i f x}}{2 a f} & \text{for}\: 2 a f e^{2 i e} \neq 0 \\x \left (\frac{2 i B c}{a} + \frac{\left (A c - 2 i B c e^{2 i e} + i B c\right ) e^{- 2 i e}}{a}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.38725, size = 184, normalized size = 3.23 \begin{align*} -\frac{\frac{2 \, B c \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}{a} - \frac{B c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{B c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} - \frac{3 \, B c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 2 \, A c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 8 i \, B c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, B c}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}^{2}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]